package com.glsc.ngateway.common.base.repo.postgre6;

import com.glsc.ngateway.common.base.domain.postgre6.ExcelGzb;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
public interface ExcelGzbRepo extends JpaRepository<ExcelGzb, ExcelGzb.PK>, JpaSpecificationExecutor<ExcelGzb>{

    @Transactional(rollbackFor = Exception.class)
    @Modifying
    @Query(value = "delete from glsc_data.t_excel_gzb where fc_date = :date and fc_fund_name = :name",nativeQuery = true)
    void delete(@Param("date") String date, @Param("name") String name);
}
